#ifndef PREF_GENERAL_H_
#define PREF_GENERAL_H_

#include "../screensaver.h"
#include "p_widgets.h"

namespace gpyp {
namespace pref {

class General : public Gtk::VBox {
private:
  Application           &app_;

  Gtk::CheckButton       run_peercast_;
  Gtk::CheckButton       run_pcraw_proxy_;
  Gtk::CheckButton       enable_status_icon_;
  Gtk::CheckButton       avoid_close_;
  Gtk::Entry             statusbar_format_;
  Gtk::Entry             shell_;
  Gtk::Entry             shell_esc_;
  Gtk::Entry             command_prefix_;
  Gtk::SpinButton        proc_detach_delay_;

  Gtk::Frame             ss_;
  Gtk::Label             ss_provider_;
  Gtk::CheckButton       ss_disable_auto_play_;
  Gtk::CheckButton       ss_mute_;

  Gtk::ComboBoxEntryText sound_driver_;
  Gtk::Table             sound_alsa_;
  Gtk::Entry             sound_alsa_card_;
  Gtk::Entry             sound_alsa_dev_;
  Gtk::Entry             sound_alsa_buf_size_;
  Gtk::Table             sound_pulse_;
  Gtk::Entry             sound_pulse_server_;
  Gtk::Entry             sound_pulse_sink_;
  Gtk::Table             sound_esd_;
  Gtk::Entry             sound_esd_host_;
  Gtk::Table             sound_oss_;
  Gtk::Entry             sound_oss_dsp_;

  autoconn               conn_ss_provider_changed_;

protected:
  void ss_on_provider_changed(ss::RefProvider provider);

  void sound_driver_on_changed();

public:
  General(Application &app, Gtk::Window &parent);
};

}/*pref*/
}/*gpyp*/

#endif/*PREF_GENERAL_H_*/
